<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">Ext.calendar.EventRecord</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext.calendar</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description"><p>This is the <a href="output/Ext.data.Record.html" ext:cls="Ext.data.Record">Record</a> specification for calendar event data used by the
<a href="output/Ext.calendar.CalendarPanel.html" ext:cls="Ext.calendar.CalendarPanel">CalendarPanel</a>'s underlying store. It can be overridden as 
necessary to customize the fields supported by events, although the existing column names should
not be altered. If your model fields are named differently you should update the <b>mapping</b>
configs accordingly.</p>
<p>The only required fields when creating a new event record instance are StartDate and
EndDate.  All other fields are either optional are will be defaulted if blank.</p>
<p>Here is a basic example for how to create a new record of this type:<pre><code>rec = <b>new</b> Ext.calendar.EventRecord({
    StartDate: <em>'2101-01-12 12:00:00'</em>,
    EndDate: <em>'2101-01-12 13:30:00'</em>,
    Title: <em>'My cool event'</em>,
    Notes: <em>'Some notes'</em>
});</code></pre>
If you have overridden any of the record's data mappings via the Ext.calendar.EventMappings object
you may need to set the values using this alternate syntax to ensure that the fields match up correctly:<pre><code><b>var</b> M = Ext.calendar.EventMappings;

rec = <b>new</b> Ext.calendar.EventRecord();
rec.data[M.StartDate.name] = <em>'2101-01-12 12:00:00'</em>;
rec.data[M.EndDate.name] = <em>'2101-01-12 13:30:00'</em>;
rec.data[M.Title.name] = <em>'My cool event'</em>;
rec.data[M.Notes.name] = <em>'Some notes'</em>;</code></pre></div><div class="hr"></div><a id="Ext.calendar.EventRecord-props"></a><h2>Public Properties</h2><div class="no-members">This class has no public properties.</div><a id="Ext.calendar.EventRecord-methods"></a><h2>Public Methods</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Method</th><th class="msource-header">Defined By</th></tr><tr class="method-row expandable"><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.calendar.EventRecord-EventRecord"></a><b class="constructor"><a href="source/EventRecord.html#cls-Ext.calendar.EventRecord">EventRecord</a></b><span class="openparen">(&nbsp;</span><span title="Optional" class="optional">[Object&nbsp;data]</span><span class="comma">,&nbsp;</span><span title="Optional" class="optional">[Object&nbsp;id]</span><span class="closeparen">&nbsp;)</span><div class="mdesc"><div class="short"></div><div class="long"><div class="mdetail-params"><strong>Parameters:</strong><ul><li><code>data</code> : Object<div class="sub-desc">(Optional) An object, the properties of which provide values for the new Record's
fields. If not specified the <a href="output/Ext.data.Field.html#Ext.data.Field-defaultValue" ext:member="defaultValue" ext:cls="Ext.data.Field">defaultValue</a>
for each field will be assigned.</div></li><li><code>id</code> : Object<div class="sub-desc">(Optional) The id of the Record. The id is used by the
<a href="output/Ext.data.Store.html" ext:cls="Ext.data.Store">Ext.data.Store</a> object which owns the Record to index its collection
of Records (therefore this id should be unique within each store). If an
id is not specified a <a href="output/Ext.calendar.EventRecord.html#Ext.calendar.EventRecord-phantom" ext:member="phantom" ext:cls="Ext.calendar.EventRecord">phantom</a>
Record will be created with an <a href="output/Ext.calendar.EventRecord.html#Ext.calendar.EventRecord-Record.id" ext:member="Record.id" ext:cls="Ext.calendar.EventRecord">automatically generated id</a>.</div></li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">EventRecord</td></tr><tr class="method-row expandable "><td class="micon"><a href="#expand" class="exi">&nbsp;</a></td><td class="sig"><a id="Ext.calendar.EventRecord-EventRecord.reconfigure"></a><b class="method"><a href="source/EventRecord.html#method-Ext.calendar.EventRecord-EventRecord.reconfigure">EventRecord.reconfigure</a></b><span class="openparen">(</span><span class="closeparen">)</span><span class="colon">&nbsp;:&nbsp;</span><span class="return">void</span><div class="mdesc"><div class="short">Reconfigures the default record definition based on the current Ext.calendar.EventMappings object</div><div class="long">Reconfigures the default record definition based on the current Ext.calendar.EventMappings object<div class="mdetail-params"><strong>Parameters:</strong><ul><li>None.</li></ul><strong>Returns:</strong><ul><li>void</li></ul></div></div></div></td><td class="msource">EventRecord</td></tr></tbody></table><a id="Ext.calendar.EventRecord-events"></a><h2>Public Events</h2><div class="no-members">This class has no public events.</div></div>